package com.dong.service;

import com.dong.security.CurrentUserHolder;
import org.springframework.stereotype.Service;

@Service
public class AuthService {
    public void checkAccess() {
        String user = CurrentUserHolder.get();
        if(!"admin".equals(user) ) {
            throw new RuntimeException(user+":  没有操作权限");
        }
    }
}
